Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use address space reservation to minimize allocations. #5645

Merged
merged 8 commits into from
Jul 15, 2022

Conversation

finnschiermer
Copy link
Contributor

@finnschiermer finnschiermer commented Jul 5, 2022

This PR may lower use of virtual address space on platforms where address space reservation is possible.

This mitigates a problem where incremental growth of the realm file along with some limited version pinning could lead to excess allocation of virtual address space - which is a problem on platforms with very limited virtual address space.

Implemented for both encrypted and non-encrypted realms.

What, How & Why?

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)

@cla-bot cla-bot bot added the cla: yes label Jul 5, 2022
@finnschiermer finnschiermer marked this pull request as draft July 5, 2022 09:30
@finnschiermer finnschiermer marked this pull request as ready for review July 11, 2022 09:23
@finnschiermer finnschiermer requested a review from ironage July 11, 2022 09:23
Copy link
Contributor

@ironage ironage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor comments, but this looks good to me!

src/realm/alloc_slab.cpp Show resolved Hide resolved
src/realm/alloc_slab.cpp Outdated Show resolved Hide resolved
src/realm/util/encrypted_file_mapping.cpp Outdated Show resolved Hide resolved
src/realm/util/encrypted_file_mapping.cpp Outdated Show resolved Hide resolved
src/realm/util/file.cpp Outdated Show resolved Hide resolved
test/test_table.cpp Outdated Show resolved Hide resolved
@finnschiermer finnschiermer requested a review from ironage July 13, 2022 15:05
@finnschiermer finnschiermer merged commit 5a622b3 into master Jul 15, 2022
@finnschiermer finnschiermer deleted the fsa/reserve-for-mmap branch July 15, 2022 09:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants